package com.yuw.homework4;

public class SalesEmployee extends ColaEmployee {
    // 属性
    private double saleTotal; // 销售总额
    private double saleRate; // 提成率

    // 行为


    public SalesEmployee(String empName, int empBirthMonth, int month, double saleTotal, double saleRate) {
        super(empName, empBirthMonth, month);
        this.saleTotal = saleTotal;
        this.saleRate = saleRate;
    }

    @Override
    public double getSalary() {
        return saleRate * saleTotal + super.getSalary();
    }
}
